package com.heartware.sh.blackhole.common.utils;

import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;

/**
 * <p>Description:
 *
 * @author xzhang
 */

public class ViewUtils {

    public static void removeView(View view){
        if(view != null){
            //获取view的parent
            ViewParent parent = view.getParent();
            if(parent != null && parent instanceof ViewGroup){
                ViewGroup viewGroup = (ViewGroup) parent;
                viewGroup.removeView(view);
            }
        }
    }
}
